package com.vm.osm.business.service;

import com.vm.osm.business.dto.req.checkPlan.ReqSelectTask;
import com.vm.osm.business.dto.req.orderInst.*;
import com.vm.osm.business.dto.rsp.orderInst.RspOrderPage;
import com.vm.osm.business.dto.rsp.orderInst.TaskOrderInfo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * Created by chenzui on 2018/3/26.
 */
public interface ICheckPlanInstService {

    /**
     * 巡检任务接单
     * @param orderId
     * @param staffId
     * @param staffName
     * @param headIcon
     */
    public void agree(String orderId,String staffId,String staffName,String headIcon);

    /**
     * 拒绝接单
     * @param orderId
     * @param type
     * @param reason
     * @param staffId
     * @param staffName
     * @param headIcon
     */
    public void disagree(String orderId,String type,String reason,String staffId,String staffName,String headIcon);

    /**
     * 转单
     * @param reqTurnOrder
     */
    public void turn(ReqTurnOrder reqTurnOrder);

    public TaskOrderInfo getOrderInfo(String id);

    public void updateLoopTask(ReqUpdateLoopTask reqUpdateLoopTask,HttpServletRequest request);

    public RspOrderPage queryLoops(Integer pageNum,Integer pageSize,String enterpriseId,String staffId);

    public RspOrderPage queryLoop(ReqSelectTask reqSelectTask,HttpServletRequest request);

    /**
     * 根据巡检计划查询巡检任务
     * @param checkPlanId
     * @param pageNum
     * @param pageSize
     * @return
     */
    public RspOrderPage queryLoops(String checkPlanId,Integer pageNum,Integer pageSize);

    /**
     * 受理外部单据
     * @param reqAcceptByDept
     * @param request
     */
    public void outAccept(ReqAcceptByDept reqAcceptByDept, HttpServletRequest request);

    /**
     * 拒绝受理外部单据
     * @param orderId,type,reason
     * @param request
     */
    public void outRefuse(String orderId,String type,String reason, HttpServletRequest request);

    /**
     * 抢单
     * @param orderId
     * @param request
     */
    public void catchOrder(String orderId,HttpServletRequest request);

    /**
     * 退回
     * @param request
     * @param orderId
     * @param remark
     */
    public void again(HttpServletRequest request,String orderId,String remark);

    /**
     * 撤销
     * @param request
     * @param orderId
     */
    public void cancel(HttpServletRequest request,String orderId);

    /**
     * 确认
     * @param request
     * @param orderId
     */
    public void confirm(HttpServletRequest request,String orderId);

    /**
     * 派单
     * @param reqAssignOrder
     * @param request
     */
    public void dispatch(ReqAssignOrder reqAssignOrder,HttpServletRequest request);
}
